<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var user = {
        name: "才寻鲲",
        type: "篮球NBA形象大使",
        like: "篮球",
      };
      var { name, type, like } = user;
      console.log(user.name);
      console.log(type);

      let foo = "haha";
      ({ foo } = { foo: "123" });
      console.log(foo);


      let arr = ['双子座','双鱼座','天蝎座','天平座','巨蟹座','处女座']

      for (let i = 0; i < arr.length; i++) {
          const array = arr[i];
          console.log(array);
          
      }

      for(item in arr){
        console.log(item);
        console.log(arr[item]);

      }


      let a = new Map()
      a.set('username',"admin");
      a.set('password','123456')
      console.log(a);
      //通过对数组的解构可以快速获取MAD对象
for(let [key,value] of a){
    console.log(key);
    console.log(value);
    
}






    </script>
  </body>
</html>
